package com.hashcodeequals;

public class Check_HashCode_Equals_Method {
public static void main(String[] args) {
	Employee e1=new Employee(1, "deepak");
	Employee e2=new Employee(1, "deepak");
	Employee e3=e1;
	System.out.println(e1+"\t hashCode : "+e1.hashCode());
	System.out.println(e2+"\t hashCode : "+e2.hashCode());
	System.out.println(e3+"\t hashCode : "+e3.hashCode());
	System.out.println();
	System.out.println("e1==e2 : "+(e1==e2));
	System.out.println("e1.equals(e2) : "+e1.equals(e2));
	System.out.println();
	System.out.println("e1==e3 : "+(e1==e3));
	System.out.println("e1.equals(e3) : "+e1.equals(e3));
}
}
